#!/usr/bin/env python2.5

import sys, dl, signal

if __name__=='__main__':
    libc = dl.open('/lib/libc.so.6')
    libc.call('prctl', 15, 'soccerbots', 0, 0, 0)
    signal.signal(signal.SIGINT, signal.SIG_DFL)

    mode = sys.argv[1]
    if mode == 'client':
        from soccerbots.core import Client
        Client()
    elif mode == 'server':
        from soccerbots.core import Server
        Server()
    else:
        print 'Possible modes are client/server'
